<script type="text/javascript">
		Yutil.en.enhance();
</script>	

<%
		//session id 
		String creator = (String) session.getValue("user");
		//get all enterprises he owned 
		Map cMap = EnterpriseService.$.getAllEnterprises(creator); 
		//if business manager select from manage
		//if business operator select from own
		if(null == cMap) 
			cMap = new HashMap();
 %>

<fieldset>
	<legend>按编号查询</legend>
	<table>
		<tr>
			<td>
				<label>企业:</label>
				<select id="cSelect" name="cSelect">
					<option value="no"><%= "请选择" %></option>
				</select>
			</td>
			<td>
				<label>人才:</label>
				<select id="eSelect" name="eSelect">
					<option value="ALL"><%= "请选择" %></option>
				</select>
			</td>
			<td>
				<label>服务:</label>
				<select>
					<option value="ALL"><%= "请选择" %></option>			
				</select>
			</td>
		</tr>
	</table>
</fieldset>

<fieldset>
	<legend>按名字查询</legend>
	<table>
		<tr>
			<td>
				<label>企业:</label>
				<select id="genProjSelect" name="genProjSelect">
					<option value="no"><%= "请选择" %></option>
				</select>
			</td>
			<td>
				<label>人才:</label>
				<select id="genModSelect" name="genModSelect">
					<option value="ALL"><%= "请选择" %></option>
				</select>
			</td>
			<td>
				<label>服务:</label>
				<select>
					<option value="ALL"><%= "请选择" %></option>			
				</select>
			</td>
		</tr>
	</table>
</fieldset>

<fieldset id="idSearchFieldset">
	<legend>按ID查询</legend>
	<form>
		<table class="form" align="left">
			<tr>
				<p class="info">You could type in C,E,SG,ST + ID</p>
			</tr>
			<tr>
				<td>
					<select id="idSearch" />
						<option value="C">企业</option>
						<option value="E">人才</option>
						<option value="SG">工资服务</option>
						<option value="ST">特殊服务</option>
					</select> 
					<input type="text" id="idSearchInput" class="required number"/>
				</td>
				<td>
					<input class="button" type="button" onclick="sear(this);" value="查询" />
				</td>
			</tr>
			<tr>
			</tr>
		</table>
	</form>
	<div id="idSearchResult">
	</div>
</fieldset>


<script type="text/javascript">
		idSearch = function(btn) {

		}
		
		sear = function(btn) {
			var url = "s_idSearch.jsp"
			var pars = "searchString=" + $('idSearch').value + $('idSearchInput').value;
			//here maybe the js framework has some bugs,add this clean code
			if($('_error')) 
				$('_error').innerHTML = '';
			if(Yform.validateAllOnSubmit(btn)) {
				var myAjax = new Ajax.Updater('idSearchResult',url,{method:'post',parameters: pars,evalScripts:true});
			}
		}
</script>

<%@ page import="com.esms.bean.Enterprise" %>
<%@ page import="com.esms.bean.Employee" %>
<%@ page import="com.esms.struts.service.*" %>
<%@ page import="java.util.*" %>

<%@ page contentType="text/html;charset=utf-8" %>